#ifndef PYTHONEDITOR_H
#define PYTHONEDITOR_H
#include "TextEditor.h"
#include "Include/IRopeProject.h"

class ErrorModel;

namespace Plugins{

class PythonEditor: public TextEditor
{
    Q_OBJECT
public:
    PythonEditor(QWidget *parent = 0);
    virtual ~PythonEditor();
    virtual void activate();
public slots:
    virtual bool reset();
protected:
    virtual void onLoad();
    virtual void onSave();
    virtual void mouseMoveEvent(QMouseEvent *e);
    virtual void mousePressEvent(QMouseEvent *e);
protected slots:
    virtual void onCodeComplite();
    void onErrorListComplete(const QList<ErrorItem>& list);
    void onAutoComplite(const CompletitionList & list);
    void onFindImplementationComplite(const QString &, int);
    void onRowActivated(int row);
private:
    void checkErrors();
    int getByCode(const QString & code);
    QString getType(const QString & named);
    //QStringList _wSeverity;
    IRopeFile* _file;
    ErrorModel *_model;
    QString _hightliteWord;
    int _hightliteWordStart;
    int _wordHightLite;
};

}
#endif // PYTHONEDITOR_H
